
#ifndef _OV5640_SCL_H_
#define _OV5640_SCL_H_

#include <stm32h7xx_hal.h>

int32_t ov5640_i2c_init(void);
int32_t ov5640_i2c_deinit(void);
int32_t ov5640_i2c_write_reg(uint16_t DevAddr, uint16_t Reg, uint8_t *pData, uint16_t Length);
int32_t ov5640_i2c_read_reg(uint16_t DevAddr, uint16_t Reg, uint8_t *pData, uint16_t Length);
int32_t ov5640_i2c_write_reg_16bit(uint16_t DevAddr, uint16_t Reg, uint8_t *pData, uint16_t Length);
int32_t ov5640_i2c_read_reg_16bit(uint16_t DevAddr, uint16_t Reg, uint8_t *pData, uint16_t Length);
int32_t ov5640_i2c_rx(uint16_t DevAddr, uint16_t Reg, uint16_t MemAddSize, uint8_t *pData, uint16_t Length);
int32_t ov5640_i2c_tx(uint16_t DevAddr, uint16_t Reg, uint16_t MemAddSize, uint8_t *pData, uint16_t Length);
int32_t ov5640_i2c_is_ready(uint16_t DevAddr, uint32_t Trials);
int32_t ov5640_get_tick(void);

#endif